//
// Created by liushuai on 18-9-25.
//

#ifndef EX15_LIST_H
#define EX15_LIST_H


#include "Node.h"

class List {
private:
    Node *head,*tail;
    int mLength;
public:
    List();
    ~List();
    void ClearList();
    bool ListEmpty();
    int ListLength();
    bool GetElem(int i,Node* pNode);
    int LocateEmen(Node* pNode);
    bool PriorElem(Node *pCurrentNode,Node* pPreNode);
    bool NextElem(Node *pCurrentNode,Node* pNextNode);
    void ListTraverse();
    bool ListInsert(unsigned int i,Node* pNode);
    bool ListDelete(unsigned int i,Node* pNode);
    bool ListInsertHead(Node* pNode);
    bool ListInsertTail(Node* pNode);
};


#endif //EX15_LIST_H
